package com.xizi.redTree;

import java.net.URL;

public class a {
    public static void main(String[] args) {
        try {
            System.out.println("AppClassLoader  " + ClassLoader.getSystemClassLoader());
            System.out.println("ExtensionClassLoader  " + ClassLoader.getSystemClassLoader().getParent());
            System.out.println("BootstrapClassLoader  " + ClassLoader.getSystemClassLoader().getParent().getParent());
        } catch (Exception e) {
            e.printStackTrace();
        }

        //获得根类加载器所加载的核心类库
        URL[] urls = sun.misc.Launcher.getBootstrapClassPath().getURLs();
        for (URL url : urls) {
            System.out.println(url.toExternalForm());
        }
    }
}
